import QRequest from '@/service/index';
import { generateNameToLevel } from '@/config/constant';
import { MemberManagementParams, MemberManagementResponse } from './model/type';
import type { QsRequestHeaderType } from '@/service/request/type';

/**
 * 分页查询成员基本信息
 */
export const doGetPageUserInfo = (
    params: MemberManagementParams,
    loading: QsRequestHeaderType['hideLoading'] = 0
) => {
    return QRequest.get<MemberManagementResponse>(`/system/user/list`, {
        params,
        headers: {
            hideLoading: loading,
            loadingTarget: `#${generateNameToLevel('2')}`
        }
    });
};
